package cn.edu.sctu.sctu_lysd.view.act;

import android.util.Log;

import java.util.ArrayList;
import java.util.List;

import cn.edu.sctu.sctu_lysd.R;
import cn.edu.sctu.sctu_lysd.base.BaseActivity;
import cn.edu.sctu.sctu_lysd.bean.Area;
import cn.edu.sctu.sctu_lysd.utils.DBhelper;
import cn.edu.sctu.sctu_lysd.utils.L;

/**
 * Created by wangfuxin on 2017-04-13.
 */

public class TestArea extends BaseActivity {

    private DBhelper dBhelper;

    @Override
    protected int getLayoutResource() {
        return R.layout.test_area;
    }

    @Override
    protected void initAfter(Object bind) {

        dBhelper = new DBhelper(this);

        List<Area> pro = new ArrayList<>();

         pro= dBhelper.getProvince();

        List<Area> city = dBhelper.getCity(dBhelper.getProvince().get(6).getCode());
        List<Area> dis = dBhelper.getDistrict(city.get(6).getCode());

        L.e("省",pro.toString());
        L.e("市",city.toString());
        L.e("区",dis.toString());


    }
}
